;;; init-dired.el --- dired config
;;; Commentary:
;;; Code:

;; dired 目录
(use-package dired
  :defer t
  :ensure nil)

;; dired-hide-dotfiles
(use-package dired-hide-dotfiles
  :defer t
  :after dired
  :hook (dired-mode . dired-hide-dotfiles-mode)
  :bind (:map dired-mode-map
              ("h" . dired-hide-dotfiles-mode)))

;; dired-subtree 子目录
(use-package dired-subtree
  :defer t
  :after dired
  :bind (:map dired-mode-map
              ("<tab>" . dired-subtree-toggle)))

;; dired-open 一些额外的文件
(use-package dired-open
  :defer t
  :after (dired dired-jump)
  :custom (dired-open-extensions '(("mp4" . "mpv"))))

;; ranger 文件浏览器
(when (not *is-win64*)
  ;; ranger: https://github.com/ralesi/ranger.el
  (use-package ranger
    :defer 2))

(provide 'init-dired)
;;; init-dired.el ends here
